package cn.kelvin.oocl.daytwo;

import cn.kelvin.oocl.daytwo.prac2.Mammal;

public class Zoo<T extends Mammal> {
	private T[] ts;
	private int max=100;
	private int cp;
	
	@SuppressWarnings("unchecked")
	public Zoo() {
		ts = (T[]) new Mammal[max];
	}
	
	public void add(T t){
		ts[cp++] = t;
	}
	
	public T get(int index){
		return ts[index];
	}
}
